package com.woody.aggregate.application.service.shop.es.strategy;

import com.woody.aggregate.infrastructure.saas.entity.SaasShopConfig;
import com.woody.aggregate.infrastructure.shop.es.esdoc.ShopInfo;
import com.woody.base.user.api.vo.BaseMerchantVO;
import com.woody.base.user.api.vo.ShopVO;

import javax.annotation.Nonnull;
import java.util.List;
import java.util.Map;

/**
 * 门店信息转换策略接口
 *
 * @author wénkǎi.zhāng
 */
public interface ShopInfoConverterStrategy {
    /**
     * 转换门店信息
     *
     * @param shopVOList     门店信息列表
     * @param esShopInfoMap  ES中已存在的门店信息Map
     * @param merchantMap    商户配置信息Map
     * @param saasShopConfigMap 商圈配置信息Map
     * @return 转换后的ES门店信息列表
     */
    @Nonnull
    List<ShopInfo> convert(List<ShopVO> shopVOList,
                          Map<Long, ShopInfo> esShopInfoMap,
                          Map<Long, BaseMerchantVO> merchantMap,
                          Map<Long, SaasShopConfig> saasShopConfigMap);
}
